package yesjava;

import java.io.Serializable;
// 标识性接口   1
public class Dog implements Serializable {
//    private static final long serialVersionUID = 7484845454446L;
    private String color;
    private String name;

    private transient Boolean sex;


    public Dog() {
    }


    public Dog(String color, String name, Boolean sex) {
        this.color = color;
        this.name = name;
        this.sex = sex;
    }

    public String getColor() {
        return color;
    }

    public Dog setColor(String color) {
        this.color = color;
        return this;
    }

    public String getName() {
        return name;
    }

    public Dog setName(String name) {
        this.name = name;
        return this;
    }

    public Boolean getSex() {
        return sex;
    }

    public Dog setSex(Boolean sex) {
        this.sex = sex;
        return this;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "color='" + color + '\'' +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                '}';
    }
}
